home *** CD-ROM | disk | FTP | other *** search
-
- ┌──────────────────────────────────────────────────────────Filo─header─(c)───┐
- │ Mod Name: WAF016.MOD Author: Wafwot #2 @2632 │
- │ Difficulty: Easy/Medium Date: Oct 1, 1992 │
- │ WWIV Version: 4.22 Tested. │
- │ Description: Sends E-Mail to a new user from the sysop. This sends the │
- │ new user E-Mail, using a file in Gfiles. Nice feature! │
- └────────────────────────────────────────────────────────────────────────────┘
-
- Addendum. This mod was the mod of the month for January 93, but it was set up
- for WWIV v4.21a and the Source it was installed in was modified to the point
- that this mod would not work in anybody elses code. It took me several hours
- to figure out how to get it into 4.22. It all works fine, but it does one
- thing I do not understand. It prints to the SysOp log, "DATA\EMAIL username &
- number". I dont know why but it does.
-
- More Descriptive:
- ─────────────────
- Ok, I have logged on to other BBS' in the country (not WWIV) and when I have
- completed the newuser logon procedure, it tells me I have mail. I'm not sure,
- but I think (VBBS) has this feature. This mail tells me about the sysop, some
- features of the BBS, and/or other tidbits of useless <grin> information about
- the BBS. It makes some of the less experienced users jump for joy, because they
- have mail on their first call... and you know how new users love to get mail!
-
-
-
- Step 1:
- ───────
- Backup.
-
-
- Step 2:
- ───────
- Load up VARS.H and add the 'echo_off' variable to the int and extern int lists.
- The examples below are from MY modded source, NOT an unmodded 'clean' source.
- So, if you see some variables that you don't have, don't add them. Just add the
- 'echo_off' variable. Sorry, I deleted the clean source... for no apparent
- reason. The 'echo_off' variable is used so that when you send the newuser
- E-Mail automatically, the user does not see all the lines associated with
- sending a load file via E-Mail. ie, File loaded into workspace, Saving...Mail
- sent to User #0, etc. It makes it seemless and invisible.
-
-
- extern int...
- save_dos, screenbottom, screenlen, screenlinest, smwcheck,
- statusfile, sysop_alert, tempio, topdata, topline, two_color,
- userfile, usernum, useron, use_workspace, using_modem, wfc, x_only,
- chat_calls, lastrandom, force_chat, echo_off;
- /* ^ ADD THIS */
-
-
- Step 3:
- ───────
- Save VARS.H and load up NEWUSER.C. This is the actual void that sends the
- E-Mail. Block copy the whole void to the end of your NEWUSER.C file.
-
- void newuser_mail(void)
- {
- char title[61],s[81],mail[81];
- messagerec msg;
-
- echo_off=0; /* turns 'echo_off' */
- title[0]=0; /* clears the title */
- strcpy(s,nam(&thisuser,usernum)); /* copy username to s */
- sprintf(mail,"%sNEWFORM.MSG",syscfg.gfilesdir); /* finds the form ltr */
- load_workspace(mail,1); /* loads form ltr */
- msg.storage_type=2; /* set mail storage */
- inmsg(&msg,title,0,0,"EMAIL",0,s,0); /* places ltr in mail */
- sendout_email(title,&msg,0,usernum,0,1,1,0,1,0); /* sends E-Mail */
- ++thisuser.waiting; /* so newuser can read it */
- echo_off=1; /* turns echo back on */
- }
-
-
- Step 4:
- ───────
- This is where we will call the newuser_mail void. In NEWUSER.C, this is between
- where the user pressed 'Q' to continue after he filled in all of his
- information, and before they have to re-enter their password. I liked it here
- because sending the mail will take a some (not much) time, and it DOES say
- 'Please wait...' while the BBS assigns a user number. This was just the obvious
- place.
- ok=0;
- newuser_mail(); /* ADD ME */
- topscreen();
- do {
- nl();
- nl();
- npr("Your user number is: %d.\r\n",usernum);
- npr("Your password is: %s.\r\n",thisuser.pw); nl();
-
-
- Step 5:
- ───────
- Since we added a new void to NEWUSER.C, load up FCNS.H and add the new
- prototype to the newuser.c section.
-
- void input_comptype(void);
- void input_screensize(void);
- void newuser_mail(void); /* ADD ME */
- void input_pw(void);
- void input_ansistat(void);
-
-
- Step 6:
- ───────
- Save FCNS.H (and NEWUSER.C if you didn't already), and load up MSGBASE.C.
- Search for void load_workspace(blahblah) and make the following changes. Again,
- this is making it so the newuser DOES NOT see the printed lines associated with
- sending mail. Make the marked lines look like what is below. I indented my
- lines, because I like to be neat. <grin>
-
- else
- use_workspace=0;
- nl();
- if (echo_off) { /* ADD */
- pl(get_string(624)); /* INDENT */
- nl(); /* INDENT */
- if (!use_workspace) /* INDENT */
- pl(get_string(625)); /* INDENT */
- } /* ADD */
- }
-
-
- Step 7:
- ───────
- Now, still in MSGBASE.C, find void inmsg(blahblah) and make the following
- changes. Again, all we are doing is adding if statements to avoid printing
- lines that we DON'T want printed with the newuser_mail. First, find the
- section of code that deals with entering a title. You can just block copy
- what I have here, or you can make the changes. Again, this came from my
- modded source, so it may not be exactly what 4.21a should be.
-
- if (echo_off) { /* ADD ME */
- nl();
- helpl=6;
- title[0]=0;
- if (okansi()) {
- prt(2,get_string(326));
- mpl(60);
- inputl(title,60);
- } else {
- pl(get_string(626));
-
- outstr(get_string(326));
- inputl(title,60);
- }
- } /* ADD ME */
-
- Then directly under this section of code, add this if statement. This is
- making a personalized title. A nice touch, if I don't say so myself.
-
- if (!echo_off) {
- sprintf(title,"WELCOME %s!",thisuser.name);
- }
-
-
- Step 8:
- ───────
- Further down in void inmsg(blahblah) in MSGBASE.C, find this section of code
- and make the indicated changes/additions.
-
- save=exist(fnx);
- if (save) {
- if (echo_off) { /* ADD ME */
- pl(get_string(639)); /* INDENT */
- } /* ADD ME */
- }
- use_workspace=0;
-
-
- Step 9:
- ───────
- Still further down, find this code, and make THESE changes.
-
- case anony_real_name:
- real_name=1;
- *anony=0;
- break;
- }
- if (echo_off) { /* ADD ME */
- outstr(get_string(91)); /* INDENT */
- } /* ADD ME */
- if (fsed) {
- i5=open(fnx,O_RDONLY | O_BINARY);
- l1=filelength(i5);
- } else {
-
-
- Step 10:
- ────────
- Now in void sendout_email, find this code, and make the indicated changes.
-
- farfree(b);
- farfree(b1);
- }
- s2[0]=0;
- if (echo_off) { /* ADD ME */
- strcpy(s,get_string(647)); /* INDENT */
- } /* ADD ME */
- if (sy==0) {
- read_user(un,&ur);
- ++ur.waiting;
- write_user(un,&ur);
-
-
- Step 11:
- ───────
- And now.... at the very bottom of void sendout_email, make this indicated
- change.
-
- save_status();
- if (!wfc)
- topscreen();
- if (echo_off) /* ADD ME */
- pl(s); /* INDENT */
- if (s2[0])
- pl(s2);
- }
-
- I know I didn't need some of those brackets, but I may add some stuff later,
- and they don't seem to effect anything.
-
-
- Step 12:
- ────────
- Ok, now just in case the newuser gets dumped off line, or they hangup on you in
- the middle of getting sent E-Mail from the newuser_mail void, we will add the
- following line to LILO.C so that the echo_off variable equals 1. 'echo_off'
- must ALWAYS equal 1 except when send a newuser mail from this mod. If echo_off
- equals 0, then your regular, registered user will not see the 'Saving...Mail
- sent to Jest #1' lines that they normally do. This will force echo_off to be 1
- for EVERY caller. In void getuser(void), near the top, add this one line.
-
- ok=0;
- checkit=1;
- okmacro=0;
- echo_off=1; /* ADD ME */
- actsl=syscfg.newusersl;
- if ((!net_only) && (incom)) {
- sprintf(s,"%sWELCOME.ANS",syscfg.gfilesdir);
- if (exist(s)) {
- nl();
- #ifdef OLD
-
- Step 13:
- ────────
- And again, just for safety, add this one line in XINIT.C. This will make
- echo_off equal 1 whenever the BBS is loaded up. In void init(void) in XINIT.C
- find this code and add the indicated line.
-
- #ifdef EMS_XMS
- if (_OvrInitEms(0,0,16)!=0)
- _OvrInitExt(0L,0);
- #endif
-
- userfile=-1;
- configfile=-1;
- statusfile=-1;
- dlf=-1;
- curlsub=-1;
- curldir=-1;
- echo_off=1; /* ADD ME */
- setvect(save_dos, getvect(INT_REAL_DOS));
- oldx=0;
-
-
- Step 14:
- ────────
- That should do it. Save all files and compile/link. You will compile the whole
- BBS, since we added a variable to VARS.H.
-
- Step 15:
- ────────
- You need to create a NEWFORM.MSG file. This is the file that is sent to the
- newuser. Below is my NEWFORM.MSG. You can use it, or create your own.
-
- ─────────────────────────────────────────────────────────────────────────────
- Welcome to Mutagenix BBS
-
- You have successfully logged onto one of New Brighton's most exciting
- bulletin boards. Thanks for calling!
-
- With most prompts, pressing a '?' will get you help. You will be presented
- with a menu of available commands for the prompt. It's really quite simple.
- If you do have trouble, press and hold the control key (Ctrl) while pressing
- the letter 'O' key. (CTRL-O). This will give you context-sensitive help
- throughout the BBS, anywhere you may be.
-
- If you want to change any features of your new account, just press 'D'to go
- to D:efaults. Here, you can change just about anything pertaining to your
- account.
-
-
- The House Rules for Mutagenix
- from your Sysop - Mutant Turtle
-
- The following set of rules shall be observed by all users of this BBS.
- Violation of any of these rules will earn the violator a citation from the
- dreaded SYSOP. (Try to not collect too many of these.)
-
- (1) Avoid flaming at other users. If you think the other user really
- deserves a flame use E-Mail.
-
- (2) If the moderator of a topic insists on no conversation outside of
- the topic, please respect his wishes. Many moderators are less
- tolerant of off-topic posts than your SYSOP.
-
- (3) Be courteous to new users. You used to be one, remember?
-
- (4) This board does not carry pirated software. Distributing same is
- grand theft. Offering to distribute it is conspiracy to commit
- grand theft.
-
- That's enough rules. Remember, this is your system too; try to make it as
- nice a place as you can. Be involved -- post messages, converse with users
- and be sure to vote when there's a referendum. Voting is what I use to find
- out what the users really want. (Then I do as I please, anyway.)
-
-
- Additional system information that you may be interested in knowing about:
-
- (1) Because of FCC regulations, the SYSOP is required to monitor all
- traffic on the BBS and is ultimately responsible for the content
- of files, E-Mail and posts. Therefore, be advised that E-mail is
- not private: I can (and do) read it. Formally, the following notice
- is presented:
-
- PURSUANT TO THE ELECTRONIC AND COMMUNICATIONS PRIVACY ACT OF 1986, 18
- USC 2510 et. seq., NOTICE IS HEREBY GIVEN THAT THERE ARE NO FACILITIES
- PROVIDED BY THIS SYSTEM FOR SENDING OR RECEIVING PRIVATE OR
- CONFIDENTIAL ELECTRONIC COMMUNICATIONS. ALL MESSAGES SHALL BE DEEMED
- TO BE READILY ACCESSIBLE TO THE GENERAL PUBLIC.
-
- Do NOT use this system for any communication for which the sender
- intends only the sender and the intended recipient or recipients to
- read.
-
-
- (2) Every 90 days the BBS will delete inactive accounts. If a user
- hasn't logged in during that period, his account is deleted.
- If you expect that you will not be able to log in for an extended
- period or ESPECIALLY if you are using your account here just for
- forwarding mail, Please notify the SYSOP so you won't be deleted.
-
-
- (3) Now the next thing you should do when you are done reading this
- is go to the Defaults area and select which Messages Sub you would
- like to have in your New Scan. At first Logon only 1 Sub in set up
- for you, "From the SysOp". This Sub can not be truned off.
-
- Thanks for trying Mutagenix BBS.
- Your SysOp,
- Mutant Turtle
- User #1@4251
-
- ─────────────────────────────────────────────────────────────────────────────
-
-